package com.xiaotu.service.mysql;

import com.xiaotu.dao.mysql.MysqlSwIndexMapper;
import com.xiaotu.entity.SyncHotSwIndexModel;
import com.xiaotu.entity.SyncSwIndexModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangxiao
 * @create 2021-11-01 15:00
 */
@Service
public class MysqlSwIndexService {

    @Autowired
    private MysqlSwIndexMapper mysqlSwIndexMapper;

    public void clearAll(String tableName) {
        mysqlSwIndexMapper.clearAll(tableName);
    }

    public void batchInsertHotSwIndex(List<SyncHotSwIndexModel> sources) {
        mysqlSwIndexMapper.batchInsertHotSwIndex(sources);
    }

    public void batchInsertSwIndex(List<SyncSwIndexModel> sources) {
        mysqlSwIndexMapper.batchInsertSwIndex(sources);
    }
}
